package top.huxy.boot.service;

import top.huxy.boot.model.vo.VOTag;

import java.util.List;

/**
 * @Classname TagService
 * @Description TagService
 * @Date 2021/9/1 9:48
 * @Created by huxy
 */
public interface TagService {
    List<VOTag> getAllTags();

    /**
     * 如果抛出异常，代表数据库唯一索引生效，拒绝插入重复tag
     * @param tag
     * @return
     * @throws Exception
     */
    boolean addStringTag(String tag) throws Exception;

    int queryTagId(String tag);

    boolean applyTag(int blogId, Integer tagId);

    List<String> getTagsNameByBlogId(Integer bid);

    @Deprecated
    boolean changeBlogTag(Integer id, List<String> tags);

    boolean changeArticleTag(Integer articleId, List<String> tags);
}
